#include "../bitset.h"

int32_t main( int32_t argc, char * argv[] )
{
	int32_t j;
#if 0
	for( j = 0; j < 1; ++j )
	{
		BitSet bs(100);
		int32_t index;

		fprintf( stderr, "=======================bitput\n" );
		for( index = 0; index < 100; ++index )
		{
			if( 0 == index % 5 )
				bs.bit_put( index, 1 );
		}
		fprintf( stderr, "=======================bitcount %d\n", bs.bit_count() );
		fprintf( stderr, "=======================bitget\n" );
		for( index = 0; index < 100; ++index )
		{
			if( bs.bit_get( index ) )
				fprintf( stderr, "%d bit is 1\n", index );
			else
				fprintf( stderr, "%d bit is 0\n", index );
		}
		fprintf( stderr, "=======================bitclear\n" );
		bs.bit_clear( 0, 99 );
		fprintf( stderr, "=======================bitset\n" );
		bs.bit_set( 0, 99 );
		for( index = 0; index < 100; ++index )
		{
			if( bs.bit_get( index ) )
				fprintf( stderr, "%d bit is 1\n", index );
			else
				fprintf( stderr, "%d bit is 0\n", index );
		}
		fprintf( stderr, "=======================bitnot\n" );
		bs.bit_not( 0, 99 );
		for( index = 0; index < 100; ++index )
		{
			if( bs.bit_get( index ) )
				fprintf( stderr, "%d bit is 1\n", index );
			else
				fprintf( stderr, "%d bit is 0\n", index );
		}
	}
	static const int32_t range = 100 / 12;
	for( j = 0; j < 12; ++j )
	{
		srand( time(NULL) );
		int32_t rand_index = rand() % range + j * range;
		fprintf( stderr, "rand index = %d\n", rand_index );
	}
#endif

    BitSet bs(10);
    bs.bit_put( 0, 1 );
    bs.bit_put( 1, 1 );
    fprintf( stderr, "bit_count = %d\n", bs.bit_count() );
	return 0;
}


